<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
<head>
<%-- <base href="<%=basePath%>"> --%>

<title>门户实例</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link href="<%=basePath%>assets/css/bootstrap.min.css" rel="stylesheet" />
<link href="<%=basePath%>assets/css/font-awesome.min.css" rel="stylesheet" />
<!--[if !IE]><!-->
<link href="<%=basePath%>assets/css/beyond.min.css" rel="stylesheet" />
<!--<![endif]-->
<link href="<%=basePath%>assets/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />
<link href="<%=basePath%>assets/css/bootstrapSwitch.css" rel="stylesheet" />
<link rel="stylesheet" href="<%=basePath%>assets/css/animations.css" />
<link rel="stylesheet" href="<%=basePath%>assets/css/portal.css" />
<script src="<%=basePath%>assets/js/html5shiv.min.js"></script>
<script src="<%=basePath%>assets/js/respond.min.js"></script>
<script src="<%=basePath%>assets/js/jquery-1.10.1.min.js"></script>
<script src="<%=basePath%>assets/js/bootstrap.min.js"></script>
<script src="<%=basePath%>assets/js/geteExample.js"></script>
<script src="<%=basePath%>assets/js/bootstrapSwitch.js"></script>
<script src="<%=basePath%>assets/js/bootstrap-datetimepicker.js"></script>
<script src="<%=basePath%>assets/js/bootstrap-datetimepicker.zh-CN.js"></script>

  <style type="text/css">
  	@media \0screen {
  	.sel {width:400px;} .titmodl{width:500px;}
  	 .plcmodl{margin-left:10%;}
  	 .titbor{border-bottom:3px solid #5db2ff; 
		  	 height:40px; 
		  	 line-height:40px;
		  	 margin-bottom:10px; padding-left:10px;
		  	 margin-top:10px;}
		.tablbor{border:1px solid #ddd; 
		line-height:35px; 
		padding-left:5px;
		border-top:2px solid #ddd; margin-top:15px;} 
		.tabl-body{margin-top:-5px;} 
	 .page{height:36px; margin-top:-40px;}
	 .datapag{margin-left:10px;}
  	 }
  	    
  	    
  	    
  	    
 #divBackground {
            width: 100%;
            height: 100%;
            left: 0px;
            top: 0px;
            z-index: 3000;
            background-color: #eee;
            position: fixed;
            filter: alpha(opacity=60);
            opacity: 0.6;
            display: none;
        }
  	 .titModal{margin: 0 20%  0 20%;
            z-index: 3100;
            position: fixed;
            top: 50px;
            display: none;
            width:600px;}
      .tclose{float: right;
			    font-size: 21px;
			    font-weight: 700;
			    line-height: 1;
			    color: #000;
			    text-shadow: 0 1px 0 #fff;
			    filter: alpha(opacity=20);
			    opacity: .2;}
	.tmodal-title {
		    margin: 0;
		    line-height: 1.42857143;
		}	
		.tmodal-header {
		    padding: 10px 15px 10px 20px;
		    background-color: #f5f5f5;
		     min-height: 16.43px;
		    border-bottom: 1px solid #e5e5e5;	
		}
.tmodal-content {
    -webkit-border-radius: 0;
    -webkit-background-clip: padding-box;
    -moz-border-radius: 0;
    -moz-background-clip: padding;
    border-radius: 0;
    background-clip: padding-box;
    -webkit-box-shadow: 0 0 40px rgba(0,0,0,.5);
    -moz-box-shadow: 0 0 40px rgba(0,0,0,.5);
    box-shadow: 0 0 40px rgba(0,0,0,.5);
    color: #000;
        position: relative;
    background-color: #fff;
    border: rgba(0,0,0,0);
       }
       .tmodal-dialog {
    width: 600px;
    margin: 30px auto;
      position: relative;  
}
  	    
      
  </style>
 <script type="text/javascript" >
 document.createElement("section"); 
 $(document).ready(function() {	 
		$("#start").datetimepicker({
			 language: 'zh-CN',
			  weekStart: 1,
			  autoclose: 1,
			  minView: 2
			 });
		
		window.setTimeout(function () { 
			 initData();
		},1000);
			  
		 $("#search").click(function(){
			 
			 initData();		
			  });						
		});
	
	
	function initData(pageNum) {		
		var name = {
				 portal_name:$("#portal_name").val(),
				 createtime:$("#createtime").val(),
				 orgid:'${orgCode }',
				 cmsrole:'${cmsrole}',
				 pageNo:pageNum
	        };
		$.ajax({
		    url:'<%=basePath%>portalAdmin/findPortal.do',
		    data:name, 
		    type:'post',
		    success:function(datas){
		    	
				  var arr=eval ("("+datas+")");				  
				  var maxPageNum = arr.maxPageNum;
				  var pageNum = arr.pageNum;
				  var totalCount =arr.totalCount;
				  document.getElementById("pageNum").value=pageNum;	    	
		    	  var prevObj = document.getElementById("prevv");
		    	  var nextObj = document.getElementById("nextt");
		    		    	
		    	if(maxPageNum == 1){
		    		
		    		prevObj.style.display = "inline";
		    		nextObj.style.display = "inline";
		    	
		    	}else if(pageNum == 1){
		    	
		    		prevObj.style.display = "inline";
		    		nextObj.style.display = "inline";
		    	
		    	}else if(pageNum == maxPageNum){
		    		
		    		prevObj.style.display = "inline";
		    		nextObj.style.display = "inline";
		    	
		    	}else{
		    	
		    		prevObj.style.display = "inline";
		    		nextObj.style.display = "inline";		    		
		    	}	   		    			    			
		  $("#yema").html(pageNum);
		  $("#yemaa").html("当前"+pageNum+"/"+maxPageNum+"&nbsp&nbsp&nbsp&nbsp"+"共"+totalCount+"条");
		  var str = "";
		  $("#contentScope").html("");                                                                                          
		  for(var i=0;i<arr.list.length;i++)
		  {   
						  		  
			 var str1 = "<tr><td>"+arr.list[i].portal_id+"</td><td>"+arr.list[i].portal_name+"</td><td>"+arr.list[i].orgname+"</td><td>"+arr.list[i].createtime+"</td><td>"+arr.list[i].use_on+"</td><td>";
			 	 if(arr.list[i].examplelook=='example_see'){
			 		str1 +="<a  id='deletee' name='deletee' href='javascript:void(0);' class='btn btn-info btn-xs' value='"+arr.list[i].portal_id+"' onclick='findByPortalid("+arr.list[i].portal_id+")' data-toggle='modal' data-target='#detailModal'> <i class='fa fa-sign-in'></i> 详情</a>&nbsp;";
			 	 }else{
			 		str1 +="<a  id='deletee' name='deletee' href='javascript:void(0);' class='btn btn-info btn-xs' value='"+arr.list[i].portal_id+"' onclick='findByPortalid("+arr.list[i].portal_id+")' data-toggle='modal' data-target='#detailModal' disabled='disabled'> <i class='fa fa-sign-in'></i> 详情</a>&nbsp;"; 
			 	 }
			 	 if(arr.list[i].examplecont=='example_conedit'){
			 		str1 +="<a href='javascript:void(0);'   onclick='iQuery("+arr.list[i].portal_id+")' class='btn btn-info btn-xs' value='"+arr.list[i].portal_id+"'   data-toggle='modal' data-target='#updModal1'><i class='fa fa-edit'></i>编辑内容</a>&nbsp;";
			 	 }else{
			 		str1 +="<a href='javascript:void(0);'   onclick='iQuery("+arr.list[i].portal_id+")' class='btn btn-info btn-xs' value='"+arr.list[i].portal_id+"'   data-toggle='modal' data-target='#updModal1' disabled='disabled'><i class='fa fa-edit'></i>编辑内容</a>&nbsp;";
			 	 }
			 	 if(arr.list[i].exampleattr=='example_attredit'){
			 		str1 +="<a href='javascript:void(0);'  onclick='findByPortalid("+arr.list[i].portal_id+")' class='btn btn-info btn-xs' value='"+arr.list[i].portal_id+"' data-toggle='modal' data-target='#updModal'><i class='fa fa-edit'></i>编辑属性</a>"; 			 		
			 	 }else{
			 		str1 +="<a href='javascript:void(0);'  onclick='findByPortalid("+arr.list[i].portal_id+")' class='btn btn-info btn-xs' value='"+arr.list[i].portal_id+"' data-toggle='modal' data-target='#updModal' disabled='disabled'><i class='fa fa-edit'></i>编辑属性</a>"; 
			 	 }
			 	 str1 +="&nbsp;<a href='javascript:void(0);'  onclick='preView("+arr.list[i].portal_id+")' class='btn btn-info btn-xs' value='"+arr.list[i].portal_id+"' data-toggle='modal' ><i class='fa fa-edit'></i>预览</a>";			 	 
			 	 
			 	 if(arr.list[i].example_del=='example_remove'){
			 		str1 +="&nbsp;<button id='deleteee' onclick='rmdata("+arr.list[i].portal_id+")' class='btn btn-danger btn-xs' value='"+arr.list[i].portal_id+"'><i class='fa fa-trash-o'></i>移除</button>"; 
			 	 }else{
			 		str1 +="&nbsp;<button id='deleteee' onclick='rmdata("+arr.list[i].portal_id+")' class='btn btn-danger btn-xs' value='"+arr.list[i].portal_id+"' disabled='disabled'><i class='fa fa-trash-o'></i>移除</button>"; 
			 	 }
			 	
			 	 str1 +="</td></tr>";
			     str = str + str1;
			 
		  }
		  $("#contentScope").html(str);
		 	 
		    },
		     error:function(data){
		     alert("失败");
		    }
		    }
		   )
	}
	
	

	
</script>
 
</head>

<body>
<div id="divBackground"></div>
	<div class="widget-header  bordered-bottom bordered-blue titbor">
		<span class="widget-caption">门户实例</span>
	</div>
	<div class="widget-body">
		<div class="docs-example">
			<form  id="accountForm" method="post" class="form-horizontal bv-form"novalidate="novalidate">
					     <div class="form-group">
							<label for="lastname" class="col-sm-1 control-label">标题</label>
								<div class="col-sm-2">
								<input type="text" class="form-control" id="portal_name" name="portal_name">
							</div>
							<label for="firstname" class="col-sm-1 control-label">时间</label>
							<div class="col-sm-2">
								<div class='input-group date ' id='start' >
						           <input type='text' class="form-control" id="createtime"  name="createtime" value="${createbegintime }"/>
						           <span class="input-group-addon">
						               <span class="glyphicon glyphicon-calendar"></span>
						           </span>
						       </div>
							</div>
							<div class="col-sm-3">
								<button type="button" id="search" 
									class="btn btn-blue glyphicon glyphicon-search">查询</button>
								<c:choose>
									<c:when test="${add_example == 'example_new' }">
										<button type="button"
									class="btn btn-blue glyphicon glyphicon-plus"
									data-toggle="modal" data-target="#myModal" id="savebtn">新建</button>
									</c:when>
									<c:otherwise>
										<button type="button"
									class="btn btn-blue glyphicon glyphicon-plus"
									data-toggle="modal" data-target="#myModal" disabled="disabled">新建</button>
									</c:otherwise>
								</c:choose>
								
							</div>
						</div>
				</form>	
				
								
						<div class="widget">
							<div class="widget-header tablbor">
								<span class="widget-caption">门户实例列表</span>
							</div>
							<div class="widget-body tabl-body">
								<div role="grid" id="nodotable_wrapper"
									class="dataTables_wrapper form-inline no-footer">
									<div id="nodotable_length" style="text-align: right; margin-bottom: 5px;">
										
									</div>
									<table class="table table-striped table-bordered table-hover"
										id="simpledatatable1">
										<thead>
											<tr>
												<th>编号</th>
												<th>标题</th>
												<th>所属单位</th>
												<th>时间</th>
												<th>是否发布</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody id="contentScope" name="contentScope">
											
										</tbody>
									</table>
									<div class="row DTTTFooter" style="margin-top:5px;">
										<div class="col-sm-6">
											<div class="dataTables_info datapag" id="nodotable_info" role="alert"
												aria-live="polite" aria-relevant="all" style="line-height: 36px;"><span id="yemaa" href="javascript:void(0)"  ></span>
												</div>
										</div>
										<div class="col-sm-6" style="text-align:right;">
											<div class="dataTables_paginate paging_bootstrap page"
												id="nodotable_paginate">
												<ul class="pagination">
														<%@ include file="/jsp/tools/page.jsp" %>
												</ul>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
		</div>
	</div>
	
	
	
		<!---新建弹框---->	
	
	<div class="modal fade plcmodl" id="myModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
		<div class="modal-dialog">
			<div class="modal-content" style="width: 850px; top: 40px;">
				<div class="modal-header" >
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">新建</h4>
				</div>
				<div class="modal-body">
					<div class="rigcen" id="cendiv4">
						<form class="form-horizontal" id="portalExample">
							<div class="form-group">
								<label class=" col-sm-2 control-label">名称</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" name="portal_name" id="porName">
								</div>
							</div>
							<div class="form-group">
								<label class=" col-sm-2 control-label">机构名称</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" value="${orgName }" name="orgname" id="orgname"/>
									<input type="hidden" value="${orgCode }" name="orgid"/>
								</div>
							</div>
							<div class="form-group">
								<label class=" col-sm-2 control-label">创建人</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" value="${userName}" name="createusername" id="createusername"/>
									<input type="hidden" value="${userId }" name="createuserid"/>
								</div>
							</div>
							<div class="form-group">
								<label class=" col-sm-2 control-label">说明</label>
								<div class="col-sm-10">
									<textarea cols="65" rows="5" id="txtare" name="portal_opinion"></textarea>
								</div>
							</div>
							<!-- <div class="form-group">
								<label class=" col-sm-2 control-label">是否公开</label>
								<div class="col-sm-10">
									<div class="switch switch-large" data-on="success" data-off="warning">
   										 <input type="checkbox" checked/><input type="hidden" id="switcheck" class="switcheck" name="numpublic" value="1"/>
									</div>
								</div>
							</div> -->
							<div style="text-align: center; padding-bottom: 30px;">
								<button type="button" class="btn btn-blue" id="next4" onclick="verifyportal();">下一步</button>
								<button type="button" class="btn btn-warning"
									data-dismiss="modal" aria-hidden="true">取 消</button>
							</div>
						</form>
					</div>
					<div class="rigcen" id="cendiv1" style="display: none;">
						<form class="form-horizontal" id="portallay">
							<div class="form-group">
								<label class=" col-sm-2 control-label">模版</label>
								<div class="col-sm-10">
									<select class="form-control" name="templateid">
										<c:forEach var="temp" items="${templatelist }">
											<option value="${temp.template_id }"><c:out value="${temp.template_name }"/></option>
										</c:forEach>

									</select>
								</div>
							</div>
							<div class="form-group">
								<label class=" col-sm-2 control-label">样式</label>
								<div class="col-sm-10">
									<select class="form-control" name="cssid">
										<c:forEach items="${portalcsslist }" var="pcl">
											<option value="${pcl.cssId }"><c:out value="${pcl.cssName }"></c:out></option>
										</c:forEach>									
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">内容布局</label>
								<div class="col-sm-10" id="ladiv">
								<input type="hidden" id="layoutcode" name="layoutcode" />
								<input type="hidden" id="pageportlet" name="pageid"/>
									<label class="label" id="lab1">
										<div class="topdiv">
											<span class="span3"></span> <span class="span1"></span> <span
												class="span2"></span>
										</div>
										<div class="footdiv">
											<span></span> <span></span> <span></span> <span></span> <span></span>
											<span></span>
										</div>
										<div style="clear: both;"></div>
										 </label> <label class="label" id="lab2">
										<div class="topdiv">
											<span class="span3"></span> <span class="span1"></span> <span
												class="span2"></span>
										</div>
										<div>
											<div class="frleft"></div>
											<div class="fright">
												<span></span>
											</div>
											<div style="clear: both"></div>
										</div> </label> <label class="label" id="lab3">
										<div class="topdiv">
											<span class="span3"></span> <span class="span1"></span> <span
												class="span2"></span>
										</div>
										<div class="footdiv">
											<div class="firfoot"></div>
											<div class="firfoot"></div>
										</div>
										<div style="clear: both;"></div> </label> <img
										src="../assets/img/12.png" style="display:none;"
										id="showimg">
								</div>
							</div>
							<div style="text-align: center; padding-bottom: 30px;">
								<button type="button" class="btn btn-warning" id="up3">上一步</button>
								<button type="button" class="btn btn-blue" id="next1" onclick="refreshportal();">下一步</button>
							</div>
						</form>
					</div>
					<div class="rigcen" style="display:none;" id="cendiv2">
						<div id="laydiv" class="laydiv" style="display:none;">
							<div class="toplay"></div>
							<div>

								<button type="button" class="btn btn-blue" id="bumbtn">+</button>
							</div>
						</div>
						<div id="laydiv1" class="laydiv" style="display:none;">
							<div class="toplay"></div>
							<div style="overflow: hidden;">
								<div class="bumleflay">
									<button type="button" class="btn btn-blue" 
										id="leftbtn">+</button>
								</div>
								<div style="
                             margin-left: 210px; ">
									<button type="button" class="btn btn-blue" 
										id="rigbtn">+</button>
								</div>
								
							</div>
						</div>
						<div id="laydiv2" class="laydiv" style="display:none;">
							<div class="toplay"></div>
							<div>
								<div class="bumlinelay">
									<button type="button" class="btn btn-blue" 
										id="leftbtn1">+</button>
								</div>
								<div class="bumlinelay"><!-- data-toggle="modal" data-target="#titModal" -->
									<button type="button" class="btn btn-blue" 
										id="cenbtn">+</button>
								</div>
								<div class="bumlinelay" style="border: 0px;">
									<button type="button" class="btn btn-blue" 
										id="rigbtn1">+</button>
								</div>
								<div style="clear: both;"></div>
							</div>
						</div>
						<div style="text-align: center; padding-bottom: 30px;">
							<button type="button" class="btn btn-warning" id="up2">上一步</button>
							<button type="button" class="btn btn-blue" id="next2" onclick="next2()" >下一步</button>
						</div>
					</div>
					<div class="rigcen" id="cendiv3" style="display:none;">
						<div style="text-align: center; padding:20px;">
							<button type="button" class="btn btn-blue" id="up1">上一步</button>
							<button type="button" class="btn btn-warning" data-dismiss="modal" aria-hidden="true" id="wanc">完 成</button>
						</div>
					</div>
				</div>

			</div>
		</div>
	</div>	
	

	<!--编辑属性弹框-->
	
	<div class="modal fade" id="updModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="updModalLabel">属性编辑</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" id="portalExample1" >
						<div class="form-group">
						<input type="hidden" id="newportalid2" name="portal_id"/>
							<label class="col-sm-2 control-label">主题</label>
							<div class="col-sm-10">
								<input type="text" class="form-control"  name="portalname"  id="portalname">
							</div>
						</div>
						
						<div class="form-group">
								<label class=" col-sm-2 control-label">修改人</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" value="${userName}"    id="createusername1"  name="createusername1" readonly="readonly"  />
									<input type="hidden" value="${userId }" name="createuserid"/>
								</div>
						</div>										
						
																							
						<div class="form-group">
								<label class=" col-sm-2 control-label">模版</label>
								<div class="col-sm-10">
									<select class="form-control"  name="templateid" id="templateEditId">										
										<c:forEach var="temp" items="${templatelist }">
											<option value="${temp.template_id }"><c:out value="${temp.template_name }"/></option>
										</c:forEach>

									</select>
								</div>
							</div>
							<div class="form-group">
								<label class=" col-sm-2 control-label">样式</label>
								<div class="col-sm-10">
									<select class="form-control"  name="cssid" id="cssEditId">
									
										<c:forEach items="${portalcsslist }" var="pcl">
											<option value="${pcl.cssId }"><c:out value="${pcl.cssName }"></c:out></option>
										</c:forEach>									
									</select>
								</div>
							</div>
												
							<div class="form-group">
								<label class=" col-sm-2 control-label">说明</label>
								<div class="col-sm-10">
									<textarea cols="65" rows="5"  name="portal_opinion" id="portalOpinionId"></textarea>
								</div>
							</div>
							<!-- <div class="form-group">
								<label class=" col-sm-2 control-label">是否公开</label>
								<div class="col-sm-10">
									<div class="switch switch-large" data-on="success" data-off="warning">
   										 <input type="checkbox" checked/><input type="hidden" id="switcheck" class="switcheck" name="numpublic" value="1"/>
									</div>
								</div>
							 </div>	 -->
						 
						 
						 <div class="modal-footer">
					<button type="button" class="btn btn-blue" id="subBtn"
						data-dismiss="modal" aria-hidden="true"  onclick="updatePortal()"  >提交</button>
					<button type="button" class="btn btn-warning" data-dismiss="modal"
						aria-hidden="true">取消</button>
				        </div>
			  							
					</form>
				</div>
				
			</div>
		</div>
	</div>
	<!--详情弹框-->
	
	<div class="modal fade" id="detailModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
		<div class="modal-dialog" style="width:1000px;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="detailModalLabel">详情</h4>
				</div>
				<div class="modal-body">
					<table class="gettabl">
						<tr>
							<td><nobr><font size="2" color="blue">标题：</font></nobr></td>
							<td id ="titleDet"></td>
							<td><nobr><font size="2" color="blue">机构名称：</font></nobr></td>
							<td >${orgName }</td>
							<td><nobr><font size="2" color="blue">创建人：</font></nobr></td>
							<td  id ="createPer" ></td>
						</tr>
						<tr>
							<td><nobr><font size="2" color="blue">说明：</font></nobr></td>
							<td id ="explain" ></td>
							<td><nobr><font size="2" color="blue">是否公开：</font></nobr></td>
							<td id ="expose" ></td>
							<td><nobr><font size="2" color="blue">模　版：</font></nobr></td>
							<td id ="templateIds" ></td>
						</tr>
						<tr>
							<td><nobr><font size="2" color="blue">样式：</font></nobr></td>
							<td id ="styleId" ></td>
							<td><nobr><font size="2" color="blue">内容布局：</font></nobr></td>
							<td id ="layoutId" ></td>
						</tr>
					</table>
				</div>
				<div class="modal-footer"></div>
			</div>
		</div>
	</div>
	
	
	<!--编辑内容弹框-->
		
	<div class="modal fade" id="updModal1" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
		<div class="modal-dialog" style="width:1000px;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="detailModalLabel">内容编辑</h4>
				</div>	
				
				
				
				<div class="rigcen"  id="cendiv12">
				<input type="hidden" id="layoutcode1" name="layoutcode1" />
						<div id="laydiv111" style="display:none;"  class="laydiv" >
							<div class="toplay"></div>
							<div>
								<button type="button" class="btn btn-blue" id="bumbtnn">+</button>
									<section></section>
							</div>
							
						</div>
						<div id="laydiv11" class="laydiv" style="display:none;">
							<div class="toplay"></div>
							<div style="overflow: hidden;">
								<div class="bumleflay">
									<button type="button" class="btn btn-blue" 
										id="leftbtnn">+</button>
										<section></section>
								</div>
								<div style="
                             margin-left: 210px; ">
									<button type="button" class="btn btn-blue" 
										id="rigbtnn">+</button>
										<section></section>
								</div>
								
							</div>
						</div>
						<div id="laydiv12" class="laydiv" style="display:none;">
							<div class="toplay"></div>
							<div>
								<div class="bumlinelay">
									<button type="button" class="btn btn-blue" 
										id="leftbtn1n">+</button>
										<section></section>
								</div>
								<div class="bumlinelay">
									<button type="button" class="btn btn-blue" 
										id="cenbtnn">+</button>
										<section></section>
								</div>
								<div class="bumlinelay" style="border: 0px;">
									<button type="button" class="btn btn-blue" 
										id="rigbtn1n">+</button>
										<section></section>
								</div>
								<div style="clear: both;"></div>
							</div>
						</div>
						<div style="text-align: center; padding-bottom: 30px;">
							<button type="button" id="wancheng"
							 class="btn btn-warning" data-dismiss="modal" aria-hidden="true">完成</button>
						</div>
					</div>
				<div class="modal-footer"></div>
			</div>
		</div>
	</div>
	
	
	<!--加的弹框
	<div class="modal fade titmodl plcmodl" id="titModal" tabindex="-1" role="dialog"
		aria-labelledby="titModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="titModalLabel">添加</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" id="portlet">
					<input type="hidden" id="page" name="pageid" />
					<input type="hidden" id="pagecolumn" name="pagerow"/>
					<input type="hidden" id="portletorder" name="portletorder"/>					
						<div class="form-group">
							<label class="col-sm-3 control-label">标题</label>
							<div class="col-sm-9">
								<select class="form-control sel"  name="viewresid" id="title">								
								<c:forEach var="viewres" items="${portletViewreslist }">
									<option value="${viewres.viewres_id}" id="${viewres.view_name}">
									<c:out value="${viewres.view_name }"/></option>
								</c:forEach>
								</select>
								<!-- <input type="hidden" class="form-control" id="title" name="portletName"> 
							</div>
						</div>
						
						<div class="form-group">
								<label class=" col-sm-3 control-label">说明</label>
								<div class="col-sm-9">
									<textarea cols="57" rows="5" id="txtare" name="portletdesc"></textarea>
								</div>
						</div>
					
						<input type="hidden" id="btnid">
						<input type="hidden" id="flag">
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-blue" id="addtitBtn"
						data-dismiss="modal" aria-hidden="true" onclick="savePortlet();">添加</button>
					<button type="button" class="btn btn-warning" data-dismiss="modal"
						aria-hidden="true">取消</button>
				</div>
			</div>
		</div>
	</div>
	-->
	
	<div id="titModal" class="titModal">
	 <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" onclick="hide()">&times;</button>
                <h4 class="modal-title" id="titModalLabel">添加</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="portlet">
                    <input type="hidden" id="page" name="pageid" />
                    <input type="hidden" id="pagecolumn" name="pagerow"/>
                    <input type="hidden" id="portletorder" name="portletorder"/>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">标题</label>
                        <div class="col-sm-9">
                            <select class="form-control sel"  name="viewresid" id="title">
                                <c:forEach var="viewres" items="${portletViewreslist }">
                                    <option value="${viewres.viewres_id}" id="${viewres.view_name}">
                                        <c:out value="${viewres.view_name }"/></option>
                                </c:forEach>
                            </select>
                            <!-- <input type="hidden" class="form-control" id="title" name="portletName"> -->
                        </div>
                    </div>

                    <div class="form-group">
                            <label class=" col-sm-3 control-label">说明</label>
                            <div class="col-sm-9">
                                <textarea cols="50" rows="5" id="txtare" name="portletdesc" style="z-index"></textarea>
                            </div>
                    </div>

                    <input type="hidden" id="btnid">
                    <input type="hidden" id="flag">
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-blue" id="addtitBtn"
                 onclick="savePortlet();">添加</button>
                <button type="button" class="btn btn-warning" onclick="hide()">取消</button>
            </div>
        </div>
    </div>
	</div>
	
	
	<!--编辑内容的添加弹框
	
	<div class="modal fade" id="titModal1" tabindex="-1" role="dialog"
		aria-labelledby="titModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="titModalLabel">内容添加</h4>
				</div>
				<form class="form-horizontal" id="portlett">
				<div class="modal-body">
					<input type="hidden" id="newportalid" name="portal_id"/>
					<input type="hidden" id="page" name="pageid" />
					<input type="hidden" id="pagecolumn1" name="pagerow"/>
						<div class="form-group">
							<label class="col-sm-3 control-label">标题</label>
							<div class="col-sm-9">
								<select class="form-control"  name="viewresid" id="title1">
								<c:forEach var="viewres" items="${portletViewreslist }">
									<option value="${viewres.viewres_id }"><c:out value="${viewres.view_name }"/></option>
								</c:forEach>
								</select>
							</div>
						</div>
						
						<div class="form-group">
								<label class=" col-sm-3 control-label">说明</label>
								<div class="col-sm-9">
									<textarea cols="55" rows="5" id="txtare" name="portletdesc"></textarea>
								</div>
						</div>
					
						<input type="hidden" id="btnid1">
						<input type="hidden" id="flag1">
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-blue" id="updatePortletBtn"
						data-dismiss="modal" aria-hidden="true" onclick="updPortlet()">添加</button>
					<button type="button" class="btn btn-warning" data-dismiss="modal"
						aria-hidden="true">取消</button>
				</div>
				</form>
			</div>
		</div>
	</div>-->
	
	
	
	
	
	<div  id="titModal1" class="titModal">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" onclick="hide1()">&times;</button>
					<h4 class="modal-title" id="titModalLabel">内容添加</h4>
				</div>
				<form class="form-horizontal" id="portlett">
				<div class="modal-body">
					<input type="hidden" id="newportalid" name="portal_id"/>
					<input type="hidden" id="page" name="pageid" />
					<input type="hidden" id="pagecolumn1" name="pagerow"/>
						<div class="form-group">
							<label class="col-sm-3 control-label">标题</label>
							<div class="col-sm-9">
								<select class="form-control"  name="viewresid" id="title1">
								<c:forEach var="viewres" items="${portletViewreslist }">
									<option value="${viewres.viewres_id }"><c:out value="${viewres.view_name }"/></option>
								</c:forEach>
								</select>
							</div>
						</div>
						
						<div class="form-group">
								<label class=" col-sm-3 control-label">说明</label>
								<div class="col-sm-9">
									<textarea cols="50" rows="5" id="txtare" name="portletdesc"></textarea>
								</div>
						</div>
					
						<input type="hidden" id="btnid1">
						<input type="hidden" id="flag1">
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-blue" id="updatePortletBtn" onclick="updPortlet()">添加</button>
					<button type="button" class="btn btn-warning" onclick="hide1()">取消</button>
				</div>
				</form>
			</div>
		</div>
	</div>

		
	<!--  编辑内容里的编辑弹框
	
	<div class="modal fade titmodl plcmodl" id="cloupdModal" tabindex="-1" role="dialog"
		aria-labelledby="cloupdModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="cloupdModalLabel">修改</h4>
				</div>
				<div class="modal-body">
				<form class="form-horizontal" id="portletEntity">
					<input type="hidden" id="page" name="pageid" />
					<input type="hidden" id="pagecolumn2" name="pagerow"/>
					<input type="hidden" id="newportalidChange" name="newportalidChange"/>
						<div class="form-group">
							<label class="col-sm-3 control-label">标题</label>
							
							<div class="col-sm-9">
								<select class="form-control sel"  name="viewresid" id="ctitle">
								<c:forEach var="viewres" items="${portletViewreslist }">
									<option value="${viewres.viewres_id}" id="${viewres.view_name}">
									<c:out value="${viewres.view_name }"/></option>
								</c:forEach>
								</select>
							</div>
							
						</div>
						<div class="form-group">
								<label class=" col-sm-3 control-label">说明</label>
								<div class="col-sm-9">
									<textarea cols="57" rows="5" id="ctxtare" name="portletdesc"></textarea>
								</div>
						</div>
					
						
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-blue" id="caddtitBtn"
						data-dismiss="modal" aria-hidden="true" onclick="updatePortallet()">修改</button>
					<button type="button" class="btn btn-warning" data-dismiss="modal"
						aria-hidden="true">取消</button>
				</div>
				
			</div>
		</div>
	</div>
-->
<div id="cloupdModal" class="titModal">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" onclick="hide3()">&times;</button>
					<h4 class="modal-title">修改</h4>
				</div>
				<div class="modal-body">
				<form class="form-horizontal" id="portletEntity">
					<input type="hidden" id="page" name="pageid" />
					<input type="hidden" id="pagecolumn2" name="pagerow"/>
					<input type="hidden" id="newportalidChange" name="newportalidChange"/>
						<div class="form-group">
							<label class="col-sm-3 control-label">标题</label>
							
							<div class="col-sm-9">
								<select class="form-control sel"  name="viewresid" id="ctitle">
								<c:forEach var="viewres" items="${portletViewreslist }">
									<option value="${viewres.viewres_id}" id="${viewres.view_name}">
									<c:out value="${viewres.view_name }"/></option>
								</c:forEach>
								</select>
							</div>
							
						</div>
						<div class="form-group">
								<label class=" col-sm-3 control-label">说明</label>
								<div class="col-sm-9">
									<textarea cols="57" rows="5" id="ctxtare" name="portletdesc"></textarea>
								</div>
						</div>
					
	
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-blue" id="caddtitBtn"
						 onclick="updatePortallet()">修改</button>
					<button type="button" class="btn btn-warning" onclick="hide3()">取消</button>
				</div>
				
			</div>
		</div>
	</div>
</body>
</html>
